package com.wn.sddfp.common.model.dto.bank;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import lombok.ToString;

/**
 * @desc 解析银行返回结果对象
   银行系统返回的数据:{"respData":{"respCode":"00000","respMsg":"成功","status":1,"requestNo":"REQ_208f14ff-b"}}
 */
@ToString
@Data
public class BankReqDto {

    private String respData;

    public static void main(String[] args) {

        String reqData = "{\"respData\":{\"respCode\":\"00000\",\"respMsg\":\"成功\",\"status\":1,\"requestNo\":\"REQ_208f14ff-b\"}}";
        BankReqDto bankReqDto = JSON.parseObject(reqData, BankReqDto.class);
        System.out.println("bankReqDto = " + bankReqDto.getRespData());

        BaseResult baseResult = JSON.parseObject(bankReqDto.getRespData(), BaseResult.class);
        System.out.println("baseResult = " + baseResult);
    }
}